// Zoombox.h: interface for the Zoombox class.
//
//////////////////////////////////////////////////////////////////////

#ifndef ZOOMBOX_H
#define ZOOMBOX_H

#include <QWidget>
#include <QPainter>

#include "plot.h"

class Zoombox : public QObject
{
	Q_OBJECT

public:
	Zoombox();

	void setPlot(Plot* newPlot);
	Plot*	getPlot();

	void draw(QPainter &p);

	void setStart(const QPoint& start);
	void setStop(const QPoint& stop);
	QRect	getArea();

	void setOutlineColor(QColor color);
	QColor getOutlineColor();

	void setBoxColor(QColor color);
	QColor getBoxColor();

	void setStyle(Qt::BrushStyle style);
	Qt::BrushStyle getStyle();

private:
	QPoint		p1;
	QPoint		p2;

	QColor		outlineColor;
	QColor		boxColor;
	Qt::BrushStyle style;
	qreal		opacity;

	/* The plot this Zoombox is associated with */
	Plot*		plot;
	
};

#endif
